/***************************************************************************
 * Copyright 2012-2013 TXT e-solutions SpA
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * This work was performed within the IoT_at_Work Project
 * and partially funded by the European Commission's
 * 7th Framework Programme under the contract ICT-257367.
 *
 * Authors:
 *      Salvatore Piccione (TXT e-solutions SpA)
 *
 * Contributors:
 *        Domenico Rotondi (TXT e-solutions SpA)
 **************************************************************************/
package it.txt.ens.authorisationService.amqp;

/**
 * @author Salvatore Piccione (TXT e-solutions SpA - salvatore.piccione AT txtgroup.com)
 * @author Domenico Rotondi (TXT e-solutions SpA - domenico.rotondi AT txtgroup.com)
 *
 */
public class ManagedVirtualHost {

    private String virtualHostName;
    private String hostingBrokerName;
    private String brokerUsername;
    private String brokerPassword;
    private Type virtualHostType;
    private String clientUsername;
    private String clientPassword;
    private String ENSAuthenticationServiceQueueName;
    private String ENSAuthenticationServiceExhangeName;
    private String ENSAuthenticationBindingSpecification;
    
    /**
     * @return the virtualHostName
     */
    public String getVirtualHostName() {
        return virtualHostName;
    }

    /**
     * @param virtualHostName the virtualHostName to set
     */
    public void setVirtualHostName(String virtualHostName) {
        this.virtualHostName = virtualHostName;
    }

    /**
     * @return the hostingBrokerName
     */
    public String getHostingBrokerName() {
        return hostingBrokerName;
    }

    /**
     * @param hostingBrokerName the hostingBrokerName to set
     */
    public void setHostingBrokerName(String hostingBrokerName) {
        this.hostingBrokerName = hostingBrokerName;
    }

    /**
     * @return the brokerUsername
     */
    public String getBrokerUsername() {
        return brokerUsername;
    }

    /**
     * @param brokerUsername the brokerUsername to set
     */
    public void setBrokerUsername(String brokerUsername) {
        this.brokerUsername = brokerUsername;
    }

    /**
     * @return the brokerPassword
     */
    public String getBrokerPassword() {
        return brokerPassword;
    }

    /**
     * @param brokerPassword the brokerPassword to set
     */
    public void setBrokerPassword(String brokerPassword) {
        this.brokerPassword = brokerPassword;
    }

    /**
     * @return the virtualHostType
     */
    public Type getVirtualHostType() {
        return virtualHostType;
    }

    /**
     * @param virtualHostType the virtualHostType to set
     */
    public void setVirtualHostType(Type virtualHostType) {
        this.virtualHostType = virtualHostType;
    }

    /**
     * @return the clientUsername
     */
    public String getClientUsername() {
        return clientUsername;
    }

    /**
     * @param clientUsername the clientUsername to set
     */
    public void setClientUsername(String clientUsername) {
        this.clientUsername = clientUsername;
    }

    /**
     * @return the clientPassword
     */
    public String getClientPassword() {
        return clientPassword;
    }

    /**
     * @param clientPassword the clientPassword to set
     */
    public void setClientPassword(String clientPassword) {
        this.clientPassword = clientPassword;
    }

    /**
     * @return the eNSAuthenticationServiceQueueName
     */
    public String getENSAuthenticationServiceQueueName() {
        return ENSAuthenticationServiceQueueName;
    }

    /**
     * @param eNSAuthenticationServiceQueueName the eNSAuthenticationServiceQueueName to set
     */
    public void setENSAuthenticationServiceQueueName(
            String eNSAuthenticationServiceQueueName) {
        ENSAuthenticationServiceQueueName = eNSAuthenticationServiceQueueName;
    }

    /**
     * @return the eNSAuthenticationServiceExhangeName
     */
    public String getENSAuthenticationServiceExhangeName() {
        return ENSAuthenticationServiceExhangeName;
    }

    /**
     * @param eNSAuthenticationServiceExhangeName the eNSAuthenticationServiceExhangeName to set
     */
    public void setENSAuthenticationServiceExhangeName(
            String eNSAuthenticationServiceExhangeName) {
        ENSAuthenticationServiceExhangeName = eNSAuthenticationServiceExhangeName;
    }

    /**
     * @return the eNSAuthenticationBindingSpecification
     */
    public String getENSAuthenticationBindingSpecification() {
        return ENSAuthenticationBindingSpecification;
    }

    /**
     * @param eNSAuthenticationBindingSpecification the eNSAuthenticationBindingSpecification to set
     */
    public void setENSAuthenticationBindingSpecification(
            String eNSAuthenticationBindingSpecification) {
        ENSAuthenticationBindingSpecification = eNSAuthenticationBindingSpecification;
    }
    
    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("ManagedVirtualHost [virtualHostName=");
        builder.append(virtualHostName);
        builder.append(", hostingBrokerName=");
        builder.append(hostingBrokerName);
        builder.append(", brokerUsername=");
        builder.append(brokerUsername);
        builder.append(", brokerPassword=");
        builder.append(brokerPassword);
        builder.append(", virtualHostType=");
        builder.append(virtualHostType);
        builder.append(", clientUsername=");
        builder.append(clientUsername);
        builder.append(", clientPassword=");
        builder.append(clientPassword);
        builder.append(", ENSAuthenticationServiceQueueName=");
        builder.append(ENSAuthenticationServiceQueueName);
        builder.append(", ENSAuthenticationServiceExhangeName=");
        builder.append(ENSAuthenticationServiceExhangeName);
        builder.append(", ENSAuthenticationBindingSpecification=");
        builder.append(ENSAuthenticationBindingSpecification);
        builder.append("]");
        return builder.toString();
    }

    public static enum Type {
        Access,
        Operational
    }
}
